import './index.scss'
import { useNavigate } from 'react-router-dom'
import leftIcon from './image/leftIcon.png'    
function NavLeft({paddingStyle,centerName}){
    const navigate =useNavigate()
    const leftIconChange=()=>{
        //返回上一个界面
        navigate(-1);
    }
    return (
        <div className="nav-left-box" style={paddingStyle}>
            <div className="left-icon-option">
                <img src={leftIcon} onClick={leftIconChange} className="left-icon"/>
            </div>
            <div className="center-txt">{centerName}</div>
            <div className="right-icon"></div>
        </div>
    )
}
export default NavLeft